<template>
  <div>
    <h2>申请主体信息</h2>
    <hr>
    <el-form :inline="true" :model="formInline" class="demo-form-inline">
      <el-form-item label="公寓名称:" label-width="200px">
        {{ formInline.detail.name }}
      </el-form-item>
      <el-form-item label="类型:" label-width="300px">
        {{ formInline.detail.type == 0 ? '个人职业房东' : '公司化公寓' }}
      </el-form-item>
      <br>
      <el-form-item label="公司名称:" label-width="200px">
        {{ formInline.detail.name }}
      </el-form-item>
      <el-form-item label="联系人:" label-width="300px">
        {{ formInline.detail.name }}
      </el-form-item>
      <br>
      <el-form-item label="手机号:" label-width="190px">
        {{ formInline.sysUser.phonenumber }}
      </el-form-item>
      <el-form-item label="申请时间:" label-width="300px">
        {{ formInline.detail.createTime }}
      </el-form-item>
      <br>
      <el-form-item label="法人姓名:" label-width="190px">
        {{ formInline.detail.corporation }}
      </el-form-item>
      <el-form-item label="法人身份证:" label-width="300px">
        {{ formInline.detail.certNum }}
      </el-form-item>
      <br>
      <el-form-item label="公司地址:" label-width="190px">
        {{ formInline.detail.address }}
      </el-form-item>
      <el-form-item label="账户类型:" label-width="300px">
        {{ formInline.detail.a }}
      </el-form-item>
      <br>
      <el-form-item label="法人身份证:" label-width="190px">
        <el-image style="width: 100px; height: 100px" :src="formInline.detail.certPicture"></el-image>
        <el-image style="width: 100px; height: 100px" :src="formInline.detail.certPicture2"></el-image>
        <el-image style="width: 100px; height: 100px" :src="formInline.detail.certPicture3"></el-image>
      </el-form-item>
      <h2>贷款详细信息</h2>
      <hr>
      <el-form-item label="业主姓名:" label-width="200px">
        {{ formInline.contractDetail.signUserName }}
      </el-form-item>
      <el-form-item label="业主身份证号:" label-width="300px">
        {{ formInline.contractDetail.signUserIdCard }}
      </el-form-item>
      <br>
      <el-form-item label="业主手机号:" label-width="200px">
        {{ formInline.contractDetail.signUserEmergencyPhone }}
      </el-form-item>
      <el-form-item label="业主银行卡号:" label-width="300px">
        {{ formInline.contractDetail.bankCard }}
      </el-form-item>
      <br>
      <el-form-item label="业主开户行:" label-width="190px">
        {{ formInline.contractDetail.bankOpen }}
      </el-form-item>
      <el-form-item label="租金合计:" label-width="300px">
        {{ formInline.sfLoanDetail.rpAmountCount + '元' }}
      </el-form-item>
      <br>
      <el-form-item label="借款金额:" label-width="190px">
        {{ formInline.sfLoanDetail.reLeaseCount + '元' }}
      </el-form-item>
      <el-form-item label="贷款利息:" label-width="300px">
        {{ formInline.sfLoanDetail.agInterestRate + '元(年化利润' + formInline.sfLoanDetail.rate + '%)' }}
      </el-form-item>
      <br>
      <el-form-item label="一次性服务费:" label-width="190px">
        {{ formInline.sfLoanDetail.serCharge + '元(发放金额的' + formInline.sfLoanDetail.rate + '%)' }}
      </el-form-item>
      <el-form-item label="还款周期:" label-width="300px">
        {{ '1个月' }}
      </el-form-item>
      <br>
      <el-form-item label="租约起始时期:" label-width="190px">
        {{ formInline.contractDetail.leaseStartTime }}
      </el-form-item>
      <el-form-item label="租约终止时期:" label-width="300px">
        {{ formInline.contractDetail.leaseEndTime }}
      </el-form-item>
      <br>
      <el-form-item label="周期还款金额:" label-width="190px">
        {{ formInline.cycleAmount + '元' }}
      </el-form-item>
      <el-form-item label="还款账期:" label-width="300px">
        {{ formInline.sfLoanDetail.monthLimit + '个月' }}
      </el-form-item>
      <br>
      <el-form-item label="维数公寓收取服务费:" label-width="240px">
        <el-input v-model="formInline.num"></el-input>
      </el-form-item>
    </el-form>
    <el-button v-if="formInline.applyState_Show_Hidden==1?true:false" type="primary" @click="test3">初审通过</el-button>
    <el-button v-if="formInline.applyState_Show_Hidden==1?true:false" type="primary" @click="test4">初审不通过
    </el-button>
    <el-button v-if="formInline.applyState_Show_Hidden==2?true:false" type="primary" @click="test3">复审通过</el-button>
    <el-button v-if="formInline.applyState_Show_Hidden==2?true:false" type="primary" @click="test4">复审不通过
    </el-button>
  </div>
</template>
<script>
import {test3, test4} from "@/api/wishu/finance/finance";

export default {
  name: "index.vue",
  data() {
    return {
      formInline: {},
    }
  }, methods: {
    test4() {
      test4(this.formInline).then(res => {
        if (res.code == 200) {
          this.$message.success("操作成功");
          this.$router.push("/jinlong/rent");
        }
      });
    },
    test3() {
      test3(this.formInline).then(res => {
        if (res.code == 200) {
          this.$message.success("通过");
          this.$router.push("/jinlong/rent");
        }
      });
    }
  }, created() {
    this.formInline = this.$route.query.dataParam;
  }
}
</script>

<style scoped>

</style>
